package co.edu.usbcali.ai.ga;

import java.io.Serializable;
import java.util.List;


public class CromosomType implements Serializable{
	
	public static final int FIXED_SIZE=0;
	public static final int VARIABLE_SIZE=1;
	public static final int HETEREOGENE=0;
	public static final int HOMOGENE=1;
	
	private int sizeType;
	private List<? extends GeneType> geneTypes;
	private int type;
	private int size;
	private long fullPopulation;
	
	/* **********************************************
	 * 
	 * **********************************************/

	/* **********************************************
	 * GETTERS AND SETTERS
	 * **********************************************/

	public int getType() {
		return type;
	}
	
	public void setType(int type) {
		this.type = type;
	}
	
	public List<? extends GeneType> getGeneTypes() {
		return geneTypes;
	}
	
	public void setGeneTypes(List<? extends GeneType> geneType) {
		this.geneTypes = geneType;
	}
	
	public int getSizeType() {
		return sizeType;
	}
	public void setSizeType(int sizeType) {
		this.sizeType = sizeType;
	}
	
	
	public int getSize() {
		return size;
	}
	public void setSize(int size) {
		this.size = size;
	}
	public long getFullPopulation() {
		return fullPopulation;
	}

	public void setFullPopulation(long fullPopulation) {
		this.fullPopulation = fullPopulation;
	}

	public boolean equals(Object p_cromosomType){
		if (p_cromosomType==null){
			return false;
		}else{
			CromosomType other=(CromosomType)p_cromosomType;
			if (getSizeType()==other.getSizeType()){
				return super.equals(p_cromosomType);
			}else{		
				return false;
			}
		}
	}
	
}
